$().ready(function () {
    bindInputFormOpen();
});

function save() {
    var data = {
        userId: $("input[name='userId']").val(),
        content: $("input[name='content']").val(),
        newb: $("input[name='newb']").val(),
        exeDate: $("input[name='exeDate']").val(),
        procDefKey: $("input[name='procDefKey']").val()
    };
    $.ajax({
        cache: true,
        type: "POST",
        url: ctx+"/salary/salary/save",
        contentType: "application/json",
        data: JSON.stringify(data),
        async: false,
        error: function (request) {
            parent.layer.alert("Connection error");
        },
        success: function (data) {
            if (data.code == 0) {
                parent.layer.msg("操作成功");
                parent.reLoad();
                var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                parent.layer.close(index);

            } else {
                parent.layer.alert(data.msg)
            }

        }
    });
}